from myelin.Ns import MYELIN, I18N, DC, DCTERMS
from myelin.rdf.bindery.ObjectTypes import ResourceTypeO, LiteralTypeO

from Resource import Resource

from ObjectTypes import \
    ThemeTypeO, ThemeTypeS, \
    AgentTypeO

from mappings import \
    DocumentMap


class Theme(Resource):
    
    ModelTypes = (ThemeTypeO, ThemeTypeS)
    
    RDF_BINDINGS = {
        'mTag'              : ((MYELIN, 'tag'), LiteralTypeO, DocumentMap),
            
        'dcTitle'           : ((DC, 'title'), LiteralTypeO, DocumentMap),
        'dcCreator'         : ((DC, 'creator'), AgentTypeO, DocumentMap),
        'dcLanguage'        : ((DC, 'language'), LiteralTypeO, DocumentMap),
        'dcDescription'     : ((DC, 'description'), LiteralTypeO, DocumentMap),
        'dcSubject'         : ((DC, 'subject'), LiteralTypeO, DocumentMap),
            
        'dctermsCreated'    : ((DCTERMS, 'created'), LiteralTypeO, DocumentMap),
        'dctermsModified'   : ((DCTERMS, 'modified'), LiteralTypeO, DocumentMap),
    }


CLASS_TYPES = {
    I18N + 'Theme' : Theme,
}